﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Text;

namespace Query2Object
{
    public interface IQuery
    {
        ISession Session { get; set; }
        List<T> GetList<T>();
        List<T> GetList<T>(int PageID, int PageSize);
        void Update();
        void Delete();
        int Count();
        IQuery From(IQueryable TableObject);
        IQuery Where(Exp exp);
        IQuery OrderBy(Exp exp, Direction dir);
        IQuery Top(int N);
        IQuery SetUpdateProperty(Exp property);
        IQuery Count(Exp column);
        IQuery Sum(Exp column);
        IQuery Avg(Exp column);
        IQuery max(Exp column);
        IQuery min(Exp column);
        IQuery GroupBy(Exp column);
        DataTable GetStatistics();
    }

    public enum Direction
    {
        ASC,
        DESC
    }
}
